package IC.AST;

public class DeclorationStatement extends Statement
{
	private Type _type;
	private String _id;
	private Expression _assigmentExpression; // may be null, if there is no assignemt.
	
	public Type GetASTType() { return _type; }
	public String GetID() { return new String(_id); }
	public Expression GetExpression() { return _assigmentExpression; }

	public DeclorationStatement (Interval interval, Type type, String id, Expression assigment)
	{
		super(interval);
		GiveBirth(_assigmentExpression = assigment); //null is checked don't worry
		GiveBirth(_type = type);
		_id = id;
	}
	
	public Object Visit(Visitor visitor) { return visitor.Visit(this); }
}
